<?php

	class Pixel_Config extends ActiveRecord {
	    
	    function _setup()
        {
            $this->table = DB_PREFIX.'pixel_config';
        }	    
        
        function validate()
        {
            $this->validates_uniqueness_of('name');
        }
        
        function &get_paged_report()
        {
            $sql = "SELECT * from {$this->table}";
            $pager = $this->pager($sql);
            $pager->row_key = 'id';
            return $pager;
        }

		function to_config_options()
		{
			return $this->db->GetAssoc('select name,value from `{$this->table}` order by name');
		}
	}

?>